package com.amazon.shop.filter.globalwebfilter;

import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;

/**

* 创建时间：2019年9月19日 下午8:00:53  

* 项目名称：rebatencenter  

* @author wanglong  

* @version 1.0   

* @since JDK 1.8.0_171  

* 文件名称：ParamsServletInputStream.java  

* 类说明： 
*
* Modification History:
* Date         Author          Version            Description
*---------------------------------------------------------*
 */


public class ParamsServletInputStream extends ServletInputStream {

    private ByteArrayInputStream bis;

    public ParamsServletInputStream(ByteArrayInputStream bis) {
        this.bis = bis;
    }

    @Override
    public boolean isFinished() {
        return true;
    }

    @Override
    public boolean isReady() {
        return true;
    }

    @Override
    public void setReadListener(ReadListener readListener) {

    }

    @Override
    public int read() throws IOException {
        return bis.read();
    }

}
